package com.jackingod.app;

//import com.jackingod.crawler.NewsCrawler;
//import com.jackingod.crawler.RegexCrawler;
import com.jackingod.crawler.RegexCrawlerNew;
import com.jackingod.crawler.TemplateCrawler;

public class CrawlerTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String[] urls = new String[3];
		
		urls[0] = "http://news.xinhuanet.com/english2010/business/2011-01/25/c_13705297.htm";
		urls[1] = "http://news.xinhuanet.com/english2010/business/2011-01/25/c_13705819.htm";
		urls[2] = "http://news.xinhuanet.com/english2010/china/2011-01/25/c_13705900.htm";
		
		//NewsCrawler crawler = new NewsCrawler();
		TemplateCrawler crawler = new RegexCrawlerNew();
		
		for (String url : urls) {
			crawler.start(url);
			System.out.println(url);
			System.out.println(crawler.getNewsTitle());
			System.out.println(crawler.getNewsContent());
			System.out.println();
		}
	}

}
